package com.wm.po;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @Author: weiming
 * @Date: 2021/5/27 15:23
 * @Description:
 */
@Data
@Document(indexName = "user")
public class User {
    @Id
    Long id;

    @Field(type = FieldType.Keyword)
    String name;

    @Field(type = FieldType.Text, analyzer = "ik_smart")
    String address;

    @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second)
    Date createTime;


}
